import { defineStore } from 'pinia'
import { ref } from 'vue'

export const useVideoMonitorStore = defineStore('videoMonitor', () => {
  const activeCamera = ref<any>(null)
  const showModal = ref(false)

  const openModal = (camera: any) => {
    activeCamera.value = camera
    showModal.value = true
  }

  const closeModal = () => {
    activeCamera.value = null
    showModal.value = false
  }

  return {
    activeCamera,
    showModal,
    openModal,
    closeModal
  }
}) 